<template>
  <div class="overview-container">
    <h3 class="section-title">工单概览</h3>
    <el-descriptions v-if="data" :column="4" border>
      <el-descriptions-item label="销售订单编号">{{ data.saleOrderCode }}</el-descriptions-item>
      <el-descriptions-item label="客户PO">{{ data.customerCode }}</el-descriptions-item>
      <el-descriptions-item label="单据来源">{{ data.source }}</el-descriptions-item>
      <el-descriptions-item label="工厂">{{ data.factoryName }}</el-descriptions-item>
      
      <el-descriptions-item label="品号">{{  }}</el-descriptions-item>
      <el-descriptions-item label="单位">{{  }}</el-descriptions-item>
      <el-descriptions-item label="入库数量">{{}}</el-descriptions-item>
      <el-descriptions-item label="预计产量">{{ }}</el-descriptions-item>

      <el-descriptions-item label="客户交期">{{ data.deliveryDate }}</el-descriptions-item>
      <el-descriptions-item label="批准日期">{{ data.completeDate }}</el-descriptions-item>
      <el-descriptions-item label="出货日期">{{ data.shipmentDate }}</el-descriptions-item>
      <el-descriptions-item label="工单状态">
        <el-tag type="success">{{ data.orderStatus }}</el-tag>
      </el-descriptions-item>
    </el-descriptions>
  </div>
</template>

<script setup lang="ts">
import { OrderVO } from '@/api/order';
import { ElDescriptions, ElDescriptionsItem, ElTag } from 'element-plus';

// 定义 props
defineProps<{
  data: OrderVO | null;
}>();
</script>

<style scoped>
.overview-container {
  margin-bottom: 20px;
}

.section-title {
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: bold;
  color: #303133;
}
</style>